<?php
namespace backend\controllers;
use yii\web\Controller;

/**
 * Daocontroller
 */
class DaoController extends Controller
{
    /**
     * {@inheritdoc}
     */
    public function actionAll(){
        $conn= \Yii::$app->db;
        $sql = "select * from country";
        $command = $conn->createCommand($sql);
        $data = $command->queryAll();
        echo  $res=json_encode($data);

    }
}
